<?php

use Illuminate\Support\Facades\Route;
use Inertia\Inertia;
use App\Http\Controllers\zhjyController\ZhjyController;
Route::prefix('dawn')->middleware('auth')->group(function () {
    
    Route::get('/dashboard/home', [ZhjyController::class, 'home']);
    
    Route::get('/dashboard/meixianghao', function () {
        return Inertia::render('home/meixianghao/Index');
    });
    
    Route::get('/dashboard/root', function () {
        return Inertia::render('home/root/Index');
    });
    
    Route::get('/dashboard/user', function () {
        return Inertia::render('home/user/Index');
    });

    Route::get('/dashboard/home/bind-info', [ZhjyController::class, 'bind_info']);

    Route::get('/dashboard/home/sign-in', [ZhjyController::class, 'sign_in']);

    Route::get('/dashboard/home/log-upload', [ZhjyController::class, 'log_upload']);


    Route::get('/dashboard/home/image-upload', function () {
        return Inertia::render('home/index/imageUpload/Index');
    });

    Route::get('/dashboard/home/gallery-management', function () {
        return Inertia::render('home/index/galleryMagerment/Index');
    });

    Route::get('/dashboard/home/job-management', function () {
        return Inertia::render('home/index/jobManagement/Index');
    });

});


Route::prefix('api/zhjy')->middleware(['auth'])->group(function () {
    // 智慧教育登录接口
    Route::post('/login', [ZhjyController::class, 'zhjyLogin']);
    Route::get('/getZhjyStatus', [ZhjyController::class, 'findZhjyStatus']);
    Route::get('/getToken', [ZhjyController::class, 'getZhjyToken']);
    Route::get('/getClocks', [ZhjyController::class, 'sign_in_json']);
    Route::post('/uploadFileUrl', [ZhjyController::class, 'uploadFileUrl']);
    Route::post('/saveZhjyClock', [ZhjyController::class, 'saveZhjyClock']);
    Route::post('/saveZhjyLog', [ZhjyController::class, 'saveZhjyLog']);
    Route::post('/getLogRows', [ZhjyController::class, 'getLogRows']);
});
